home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
A.C.E. 3
/
ACE CD 3.iso
/
files
/
utils
/
aplay200.lha
/
APlayer
/
Files
/
Developer.lha
/
Include3.0
/
Own
/
AccessiblePlayer.i
next >
Wrap
Text File
|
1995-12-23
|
15KB
|
590 lines
; AccessiblePlayer Include File
;
IFND APlayer_i
APlayer_i = 1
IFND EXEC_TYPES_I
INCLUDE "Exec/Types.i"
ENDC
IFND UTILITY_TAGITEM_I
INCLUDE "Utility/Tagitem.i"
ENDC
apVersion = 6 ;Current Version Of APlayer
;******************************************************************************
;* Library Offsets
;******************************************************************************
apGetTags = -30
;******************************************************************************
;* Message Numbers
;******************************************************************************
MSG_NextMod = "NM" ;Load Next Module
MSG_NextPos = "NP" ;Update Position
MSG_CallBack = "CB" ;Call Your CallBack Routine
; Messages From Version 3 (Released as 1.21)
MSG_UpdateAbout = "UA" ;Update About Window
; Messages From Version 6 (Released as 2.00)
MSG_UpdateTempo = "UT" ;Update Tempo In About Window
;******************************************************************************
;* Tags
;******************************************************************************
APT_TagBase = $80000000+"AP"
ENUM APT_TagBase
EITEM APT_RequestVersion
EITEM APT_EarlyCheck
EITEM APT_Check
EITEM APT_LoadModule
EITEM APT_FreeModule
EITEM APT_GetError
EITEM APT_ExtLoad
EITEM APT_ExtFree
EITEM APT_InitPlayer
EITEM APT_EndPlayer
EITEM APT_InitSound
EITEM APT_EndSound
EITEM APT_Interrupt
EITEM APT_StartIRQ
EITEM APT_StopIRQ
EITEM APT_Config ;OBSOLETE
EITEM APT_PlayerName
EITEM APT_Description
EITEM APT_ModuleName
EITEM APT_Author
EITEM APT_SubSong
EITEM APT_CIA ;OBSOLETE
EITEM APT_Pause
EITEM APT_Volume
EITEM APT_VolumeFunc
EITEM APT_FastMem ;OBSOLETE
EITEM APT_GetMaxPattern
EITEM APT_GetMaxSample
EITEM APT_GetSongLength
EITEM APT_GetSongPos
EITEM APT_Rewind
EITEM APT_Forward
EITEM APT_ChangeChannel
EITEM APT_TestNextLine
EITEM APT_GetSample ;OBSOLETE
EITEM APT_PlaySample ;OBSOLETE
EITEM APT_RealtimePlay
EITEM APT_CallBack
; Tags From Version 2 (Released as 1.1)
EITEM APT_Flags
; Tags From Version 3 (Released as 1.21)
EITEM APT_CfgWindow
; Tags From Version 4 (Released as 1.30)
EITEM APT_NewConfig
EITEM APT_UsedChannels
EITEM APT_SamplesType
EITEM APT_GetSampleInfo
EITEM APT_NewPlaySample
EITEM APT_NotePlayer
EITEM APT_DefaultPlayerInfo
EITEM APT_NotePlayerInfo
EITEM APT_InitNotePlayer
EITEM APT_EndNotePlayer
EITEM APT_InitNotePlayerSound
EITEM APT_EndNotePlayerSound
EITEM APT_PlayNote
; Tags From Version 5 (Released as 1.40)
EITEM APT_Show
EITEM APT_ShowWindow
EITEM APT_AgentType
EITEM APT_AgentHandler
; Tags From Version 6 (Released as 2.00)
EITEM APT_ChanSignal
EITEM APT_TempoFunc
EITEM APT_OSVersion
; EITEM APT_VirtualChangeChannel;Not Used Yet
APT_NotePlayerName = APT_PlayerName
APT_AgentName = APT_PlayerName
;******************************************************************************
;* APT_Flags Flags
;******************************************************************************
AFB_AnyMem = 0
AFB_UseAudio = 1
AF_AnyMem = 1<<AFB_AnyMem
AF_UseAudio = 1<<AFB_UseAudio
; Flags From Version 3 (Released as 1.21)
AFB_SongEnd = 2
AF_SongEnd = 1<<AFB_SongEnd
; Flags From Version 6 (Released as 2.00)
AFB_Sample = 3
AF_Sample = 1<<AFB_Sample
;******************************************************************************
;* APT_NotePlayerInfo & APT_NotePlayer Flags From Version 4 (Released as 1.30)
;******************************************************************************
ANFB_ChipMem = 0 ;Only Used In APT_NotePlayerInfo
ANFB_FastMem = 1 ;Only Used In APT_NotePlayerInfo
ANFB_HardwareVolume = 2
ANFB_Signed = 3
ANFB_Unsigned = 4
ANFB_Clock = 5
ANF_ChipMem = 1<<ANFB_ChipMem
ANF_FastMem = 1<<ANFB_FastMem
ANF_HardwareVolume = 1<<ANFB_HardwareVolume
ANF_Signed = 1<<ANFB_Signed
ANF_Unsigned = 1<<ANFB_Unsigned
ANF_Clock = 1<<ANFB_Clock
;******************************************************************************
;* APT_SamplesType Types From Version 4 (Released as 1.30)
;******************************************************************************
ST_Signed = 1
ST_Unsigned = 2
;******************************************************************************
;* APT_AgentType Types From Version 5 (Released as 1.40)
;******************************************************************************
AGNT_SampleSaver = 1
; APT_AgentType Types From Version 6 (Released as 2.00)
AGNT_Scope = 2
AGNT_FSS = 3 ;Private
;******************************************************************************
;* Agent Data Structures
;******************************************************************************
STRUCTURE AGSampleSaver,0
APTR AGSS_SampleInfo ;Pointer To A SampleInfo Structure
LABEL AGSampleSaver_SIZEOF
; Agent Data Structures From Version 6 (Released as 2.00)
STRUCTURE AGFSS,0 ;Private
UWORD AGFS_Action
ULONG AGFS_Data1
ULONG AGFS_Data2
ULONG AGFS_Data3
ULONG AGFS_Data4
LABEL AGFSS_SIZEOF
FSA_Start = 1 ;Initialize Agent
FSA_End = 2 ;Stop Agent
FSA_Load = 3 ;Load FSS File
FSA_Save = 4 ;Save FSS File
FSA_Update = 5 ;Update FSS List
;******************************************************************************
;* Global Data Structure
;******************************************************************************
STRUCTURE APlayerGlobal,0
ULONG APG_FileSize
UWORD APG_Tune
UWORD APG_Reserved0
UBYTE APG_MaxVolume
UBYTE APG_Tempo
FPTR APG_CutPrefix ;Private
FPTR APG_LoadModule ;Private
FPTR APG_AddFile ;Private
FPTR APG_AllSleep ;Private
FPTR APG_AllUnsleep ;Private
APTR APG_ModList ;Private
APTR APG_LhaList ;Private
APTR APG_LhaNum ;Private
APTR APG_LzxList ;Private
APTR APG_LzxNum ;Private
FPTR APG_AllocMem
FPTR APG_FreeMem
FPTR APG_GetFilename
FPTR APG_FindName
FPTR APG_CheckLoad
FPTR APG_PartialLoad
FPTR APG_Load
FPTR APG_DupOpen
FPTR APG_DupClose
FPTR APG_Seek
FPTR APG_PlaySample ;OBSOLETE
FPTR APG_CalcVolume
FPTR APG_WaitDMA
FPTR APG_SendMsg
FPTR APG_SetTimer
FPTR APG_NewProcess
FPTR APG_OpenWindow
FPTR APG_WaitMsg
FPTR APG_Reply
FPTR APG_ActivateGadget
FPTR APG_GetGadAdr
FPTR APG_Flash
FPTR APG_AllocChannels
FPTR APG_FreeChannels
; Data/Functions From Version 2 (Released as 1.1)
FPTR APG_CutSuffix
; Data/Functions From Version 3 (Released as 1.21)
FPTR APG_OpenFile
FPTR APG_CloseFile
FPTR APG_DirRequester
FPTR APG_FileRequester
FPTR APG_UpdateGadgets
FPTR APG_CalcTempo
; Data/Functions From Version 4 (Released as 1.30)
APTR APG_IntBase ;Intuition.library
APTR APG_GfxBase ;Graphics.library
APTR APG_UtiBase ;Utility.library
APTR APG_ReqBase ;Reqtools.library
ULONG APG_Clock
ULONG APG_MixingRate
APTR APG_SampleInfo
APTR APG_NullSample
APTR APG_ChannelInfo
FPTR APG_NotePlayer
FPTR APG_NewPlaySample
FPTR APG_GetMaxVolume
UWORD APG_MaxChannels
; Data/Functions From Version 5 (Released as 1.40)
FPTR APG_OpenShowWindow
FPTR APG_CloseWindow
FPTR APG_Sleep
FPTR APG_Unsleep
FPTR APG_LVSetAttrs
FPTR APG_LVGetAttrs
FPTR APG_LVChangeColor
FPTR APG_CreateList
FPTR APG_RemoveList
FPTR APG_AddNode
FPTR APG_DeleteNode
FPTR APG_DeleteList
FPTR APG_CopyList
FPTR APG_ExchangeNodes
FPTR APG_MoveToTop
FPTR APG_MoveToBottom
FPTR APG_FindNode
FPTR APG_FindNodeNumber
FPTR APG_StringCompare
; Data/Functions From Version 6 (Released as 2.00)
FPTR APG_GetScreenHd
APTR APG_GadBase ;Gadtools.library
FPTR APG_GetMemType
FPTR APG_AllocScopeSignal
FPTR APG_FreeScopeSignal
FPTR APG_GetScopeSignal
FPTR APG_TestScopeSignal
APTR APG_ChannelFlags
APTR APG_ListFont
APTR APG_GeneralFont
BOOL APG_LoopFlag
FPTR APG_DosError
FPTR APG_ShowRequest
LABEL APlayerGlobal_SIZEOF
;******************************************************************************
;* Sample Info Structure From Version 4 (Released as 1.30)
;******************************************************************************
STRUCTURE SampleInfo,0
UBYTE SI_Type ;See below for the types.
UBYTE SI_Flags ;See below for the flags.
APTR SI_Name ;This should be a pointer to a
;NULL-terminated string with the name
;of the sample here.
APTR SI_Address ;Set this to the start address of the
;sample. Zero means no sample.
LONG SI_RealLength ;Set this to the length of the sample
;in bytes.
LONG SI_Length ;This should be the length of the
;sample in 8 bits. That means if you
;have a 16 bit sample, this should be
;the half of the SI_RealLength size.
APTR SI_LoopStart ;Set this to the address where to loop
;from. If no loop, set this to the
;start address of the sample.
LONG SI_LoopLength ;This should indicate how many bytes
;of the sample to be looped. Zero
;means no loop.
UBYTE SI_Volume ;Set this to the volume of the sample.
UBYTE SI_Finetune ;This is a byte between -8 and +7.
UBYTE SI_SampleBit ;Set this to the bit size of the sample
UBYTE SI_Pad
LABEL SampleInfo_SIZEOF
;******************************************************************************
;* SampleInfo Types From Version 4 (Released as 1.30)
;******************************************************************************
SIT_Sample = 0
SIT_AM = 1
SIT_FM = 2
SIT_Hybrid = 3
SIT_AdLib = 4
; SampleInfo Types From Version 5 (Released as 1.40)
SIT_WaveSynth = 5
;******************************************************************************
;* SampleInfo Flags From Version 4 (Released as 1.30)
;******************************************************************************
SIFB_Unsigned = 0 ;Set this if the sample is unsigned.
SIF_Unsigned = 1<<SIFB_Unsigned
;******************************************************************************
;* NotePlayer Channel Structure From Version 4 (Released as 1.30)
;******************************************************************************
STRUCTURE NPChannel,0
UBYTE NPC_Flags
UBYTE NPC_Bits ;From Version 6 (Default 8)
APTR NPC_Start
ULONG NPC_Length
APTR NPC_LoopStart
ULONG NPC_LoopLength
UWORD NPC_Period
UWORD NPC_Volume
ULONG NPC_Reserved1
ULONG NPC_Reserved2
UWORD NPC_Reserved3
LABEL NPChannel_SIZEOF
;******************************************************************************
;* NotePlayer Channel Flags From Version 4 (Released as 1.30)
;*
;* These bit will be set if the equal field in the NPChannel structure above
;* is valid.
;******************************************************************************
NPCFB_Sample = 0
NPCFB_Loop = 1
NPCFB_Period = 2
NPCFB_QuadroPeriod = 3
NPCFB_Volume = 4
NPCF_Sample = 1<<NPCFB_Sample
NPCF_Loop = 1<<NPCFB_Loop
NPCF_Period = 1<<NPCFB_Period
NPCF_QuadroPeriod = 1<<NPCFB_QuadroPeriod
NPCF_Volume = 1<<NPCFB_Volume
; NotePlayer Channel Flags From Version 5 (Released as 1.40)
NPCFB_WordLength = 5
NPCF_WordLength = 1<<NPCFB_WordLength
;******************************************************************************
;* Config Structure From Version 4 (Released as 1.30)
;******************************************************************************
STRUCTURE ConfigStruct,0
FPTR CS_GadUpdate ;Pointer to a function that will fill
;out a tag list with the new values.
;It should return a pointer to the tag
;lists in A0.
FPTR CS_Exit ;Pointer to a Exit function.
UWORD CS_Width ;Window Width.
UWORD CS_Height ;Window Height.
APTR CS_Title ;Pointer To Window Title.
ULONG CS_IDCMP ;Extra IDCMPs. These IDCMPs will
;always be set: GADGETUP, GADGETDOWN,
;VANILLAKEY, MENUPICK and REFRESHWINDOW
APTR CS_PrefName ;Pointer to a preference filename
;with only the "Player" or "NotePlayer"
;path.
APTR CS_PrefData ;Pointer to your preference data.
APTR CS_DefPrefData ;Pointer to your default pref. data.
ULONG CS_PrefSize ;Number of bytes in your preferences.
UWORD CS_GadgetNum ;Number of gadgets you want - 1.
;Then the Gadget Structure if any
;gadgets. See macro below.
UWORD CS_BevelNum ;Number of bevel boxes you want - 1.
;Then the Bevel Box Structure if any
;boxes. See macro below.
BOOL CS_Text ;Text strings boolean. Set this if you
;want some text else clear it.
;Then the normal IntuiText structures
;linked together.
;******************************************************************************
;* Show Window Structure From Version 5 (Released as 1.40)
;******************************************************************************
STRUCTURE ShowStruct,0
FPTR SS_GadUpdate ;Pointer to a function that will fill
;out a tag list with the new values.
;It should return a pointer to the tag
;lists in A0.
FPTR SS_Exit ;Pointer to a Exit function.
UWORD SS_Width ;Window Width.
UWORD SS_Height ;Window Height.
APTR SS_Title ;Pointer To Window Title.
ULONG SS_IDCMP ;Extra IDCMPs. These IDCMPs will
;always be set: CLOSEWINDOW, GADGETUP
;REFRESHWINDOW and VANILLAKEY.
UWORD SS_GadgetNum ;Number of gadgets you want - 1.
;Then the Gadget Structure if any
;gadgets. See macro below.
BOOL SS_Menu ;Menu boolean. Set this if you want
;a menu else clear it. This is not
;implemented yet, but for future
;compatible, clear it.
UWORD SS_BevelNum ;Number of bevel boxes you want - 1.
;Then the Bevel Box Structure if any
;boxes. See macro below.
BOOL SS_Text ;Text strings boolean. Set this if you
;want some text else clear it.
;Then the normal IntuiText structures
;linked together.
;******************************************************************************
;* This Macro helps you to make Gadgets in your config window
;******************************************************************************
GADSTR MACRO
dc.w \2,\3,\4,\5,\6 ;X, Y, Width, Height, ID
dc.l \7,\8,\9 ;Flags, Text, Tags
dc.w \1 ;Kind
ENDM
;******************************************************************************
;* This Macro helps you to make Bevel Boxes in your config window
;******************************************************************************
BEVSTR MACRO
dc.w \1,\2,\3,\4 ;X, Y, Width, Height
dc.w \5 ;Normal (FALSE) Or Recessed (TRUE)
ENDM
;******************************************************************************
;* Special Gadget Kinds From Version 3 (Released as 1.21)
;******************************************************************************
DISK_KIND = 800 ;Will Make A Disk Gadget
UPARROW_KIND = 801 ;Up Arrow Image Button
DOWNARROW_KIND = 802 ;Down Arrow Image Button
; Special Gadget Kinds From Version 5 (Released as 1.40)
NEWLISTVIEW_KIND= 700 ;Kickstart 3.0 Look ListViews
;******************************************************************************
;* NEWLISTVIEW_KIND Tags From Version 5 (Released as 1.40)
;******************************************************************************
; C=Create
; S=Set
; G=Get
NLV_TagBase = $80000000+"NLV"
ENUM NLV_TagBase
EITEM NLV_Labels ;CS
EITEM NLV_Top ;CS
EITEM NLV_Selected ;CSG
EITEM NLV_SelectTwice ;C
EITEM NLV_CursorKeys ;C
EITEM NLV_ScrollWidth ;C
EITEM NLV_Tabs ;C
EITEM NLV_Font ;C
EITEM NLV_Function ;C
EITEM NLV_MoveTop ;S
; NEWLISTVIEW_KIND Tags From Version 6 (Released as 2.00)
EITEM NLV_ReadOnly ;C
ENDC